// TimeGreeting.txt

void main()
{

_TimeGreeting();

_Exit();
}




int _TimeGreeting()  //a- 
{
assign t1 Time
assign t2 Noon

cout << "Program: Time Greeting"  << endl << endl;  //a-

//  System displays time and put it in t1
// format is byte 0 = sec, byte 1 = min and byte 3 = hour
//s- Display Time and Date, store in t1
cout << "Time = "   <<  "IO:TIME"  << endl;


//s- Set t1 to hours
srli Time,Time, 8   # Shift right to move the byte to position 0
andi Time, Time, 0xFF # Mask out only the lowest byte



//s- Noon = 12
addi Noon, zero, 12


//N-Afternoon  t1 >= Noon ? 
bge Time, Noon Afternoon

//s- Say Good Morning
cout << "Good Morning!"  << endl;
//g-end
beq zero,zero end;

Afternoon:
//s- Say Good Afternoon!
cout << "Good Afternoon!"   << endl;
end:
//x-
}
